package com.xxwy.simple.apply.customer;

import com.xxwy.simple.apply.common.HelloServer;
import com.xxwy.simple.rpc.client.NettyClient;

/**
 * @author wy
 * @date 2020/3/9 11:09
 */
public class XxwyBootstrap {

  public static void main(String[] args) {
    NettyClient.start("127.0.0.1",6666);

    NettyClient nettyClient = new NettyClient();
    HelloServer helloServer = (HelloServer)nettyClient.getBean(HelloServer.class, "HelloServiceImpl#");
    //通过代理对象调用服务提供这个的方法

    String hello = helloServer.hello("我是你爸爸");
    System.out.println(hello);

  }
}
